home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Multimedia / Movie3.0 / Source / xanim / xanim_config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-02  |  8.7 KB  |  250 lines

  1.  
  2. /*
  3.  * xanim_config.h
  4.  *
  5.  * Copyright (C) 1990,1991,1992,1993,1994 by Mark Podlipec.
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified and redistributed without
  9.  * fee for non-commerical purposes provided that this copyright notice is
  10.  * preserved intact on all copies and modified copies.
  11.  *
  12.  * There is no warranty or other guarantee of fitness of this software.
  13.  * It is provided solely "as is". The author(s) disclaim(s) all
  14.  * responsibility and liability with respect to this software's usage
  15.  * or its effect upon hardware or computer systems.
  16.  *
  17.  */
  18.  
  19.  
  20. /* These defines are used to initialize the various flags that control
  21.  * the behavious of XAnim. They all can be overriden on the command
  22.  * line except for DEFAULT_PLUS_IS_ON and DEFAULT_X11_VERBOSE_FLAG.
  23.  */
  24.  
  25.  
  26. /* If this is TRUE then '+' will turn an option on and '-' will turn it off.
  27.  * if this is FALSE then '+' will turn an option off and '-' will turn
  28.  * it on.
  29.  */
  30. #define DEFAULT_PLUS_IS_ON    TRUE
  31.  
  32. /* If TRUE then animations will be buffered ahead of time. Uses more memory.
  33.  */
  34. #define DEFAULT_BUFF_FLAG    FALSE
  35.  
  36. /* If TRUE then animations will be read from disk. This and BUFF_FLAG are
  37.  * mutually exclusive with BUFF_FLAG having priority.
  38.  */
  39. #define DEFAULT_FILE_FLAG    FALSE
  40.  
  41. /* If TRUE then iff animations will always loop back to 1st frame instead
  42.  * of to the 2nd delta. There is no easy way of knowing this ahead of time
  43.  * and and is rare and so it should be kept FALSE.
  44.  */
  45. #define DEFAULT_IFF_LOOP_OFF    FALSE
  46.  
  47. /* If TRUE then IFF CRNG (color cycling chunks) will be activated for
  48.  * single image IFF files.
  49.  */
  50. #define DEFAULT_CYCLE_IMAGE_FLAG    TRUE
  51.  
  52. /* If TRUE then IFF CRNG (color cycling chunks) will be activated for
  53.  * IFF animation files.
  54.  */
  55. #define DEFAULT_CYCLE_ANIM_FLAG        FALSE
  56.  
  57. /* If TRUE then image height is reduced by half if an IFF image/animation
  58.  * is interlaced.
  59.  */
  60. #define DEFAULT_ALLOW_LACE_FLAG        FALSE
  61.  
  62. /* If TRUE then the cmap will fade to black between files. Only works
  63.  * on PSEUDO_COLOR displays.
  64.  */
  65. /* NOTE: CURRENTLY NOT SUPPORTED */
  66. #define DEFAULT_FADE_FLAG    FALSE
  67. #define DEFAULT_FADE_TIME    20
  68.  
  69. /* If TRUE then window will be the size of the largest image. Smaller
  70.  * images and animations will be in upper left hand corner.
  71.  */
  72.  
  73. #define DEFAULT_NORESIZE_FLAG    FALSE
  74.  
  75. /* If TRUE then a window can be resized with the mouse. This results
  76.  * in the animation being scaled to fit and window. This also overrides
  77.  * DEFAULT_NORESIZE_FLAG.
  78.  */
  79. #define DEFAULT_ALLOW_RESIZING    FALSE
  80.  
  81. /* This affect IFF type 5 and J compressions as well as most FLI/FLC type
  82.  * compressions. Only the minimum area of the screen is updated that
  83.  * contains the changes from one image to the next. This is forced off
  84.  * in MONOCHROME mode due to peculiarities of the Floyd-Steinburg
  85.  * dithering algorithm. Having this on can cause "apparent" pauses in
  86.  * the animation because of the time difference between updating the
  87.  * entire screen and just part of it. This will occur if your hardware
  88.  * can not display the images at the specified rate. Turning optimization
  89.  * off will force the entire animation to go at the slower rate.
  90.  */
  91. #define DEFAULT_OPTIMIZE_FLAG    TRUE
  92.  
  93. /* If this is TRUE and DEFAULT_BUFF_FLAG is TRUE, the images will be
  94.  * put into pixmaps. Pixmaps have the following advantages:
  95.  *     they are stored locally  (in case you're running remotely)
  96.  *     they aren't copied twice (like most X11 servers do with XImages)
  97.  *     they could be in display memory(if your hardware has enough of it)
  98.  * It usually speeds things up.
  99.  */
  100. #define DEFAULT_PIXMAP_FLAG    FALSE
  101. /* If TRUE then Floyd-Steinberg dithering is used for MONOCHROME displays
  102.  */
  103. #define DEFAULT_DITHER_FLAG    TRUE
  104.  
  105. /* This cause XAnim to print out debugging information. Valid levels are
  106.  * from 1 to 5, with 0 being off.
  107.  */
  108. #define DEFAULT_DEBUG        0
  109.  
  110. /* When this is TRUE it causes XAnim to print out extra information about
  111.  * the animations
  112.  */
  113. #define DEFAULT_VERBOSE        FALSE
  114.  
  115. /* This is the default number of times to loop through each file before
  116.  * continuing on.
  117.  */
  118. #define DEFAULT_LOOPEACH_FLAG    1
  119.  
  120. /* When this is TRUE it causes XAnim to "ping-pong" an animation. In other
  121.  * words, the anim will be played forwards to the end and then backwards
  122.  * to the beginning. This will be counted as one loop.
  123.  */
  124. #define DEFAULT_PINGPONG_FLAG    FALSE
  125.  
  126. /* This is the number of milliseconds between frames of the animation.
  127.  * If 0 then the number of milliseconds is taken from the animation
  128.  * itself.
  129.  */
  130. #define DEFAULT_JIFFY_FLAG    0
  131.  
  132. /* This is the number of milliseconds for single image cycling IFF files.
  133.  */
  134. #define DEFAULT_CYCLING_TIME   8000
  135.  
  136. /* Not yet supported
  137.  */
  138. #define DEFAULT_PACK_FLAG    FALSE
  139.  
  140. /* This causes XAnim to print out more information about the X11
  141.  * display on which it is running.
  142.  */
  143. #define DEFAULT_X11_VERBOSE_FLAG    FALSE
  144.  
  145.  
  146. /* COLOR DITHERING. Currently only NONE and FLOYD are supported. FLOYD
  147.  * dithering can add substantially to run and start up times.
  148.  */
  149. #define CMAP_DITHER_NONE    0
  150. #define CMAP_DITHER_FLOYD    1
  151. #define CMAP_DITHER_ORDERED    2
  152.  
  153. /* COLOR MAP STUFF.
  154.  *    luma_sort:   sorts the color map based on color's brightness
  155.  *    map_to_1st:  remaps new cmaps into 1st cmap. If try_to_1st fails
  156.  *           or isn't set.
  157.  *    map_to_one:  Creates one colormap from all color maps and then
  158.  *           remaps all images/anims to that cmap. Eliminates
  159.  *           flickering, but may reduce color quality.
  160.  *    play_nice:   Allocate colors from X11 defaults cmap. Screen colors
  161.  *           won't change when mouse is moved into and out of 
  162.  *           animation window. Color Cyling impossible with this
  163.  *           option. If you are running with non-default Visual,
  164.  *           X11 might have to change the colormap anyways.
  165.  *    hist_flag:   If XAnim needs to generate one cmap from multiple
  166.  *           (ie map_to_one/play_nice or cmap > X11's cmap) then
  167.  *           do histograms on any uncompressed images to aid in
  168.  *           color reductions if necessary. More time at startup
  169.  *           but might help color quality.
  170.  */
  171. #define DEFAULT_CMAP_LUMA_SORT    FALSE
  172. #define DEFAULT_CMAP_MAP_TO_1ST    FALSE
  173. #define DEFAULT_CMAP_MAP_TO_ONE    FALSE
  174. #define DEFAULT_CMAP_PLAY_NICE  TRUE
  175. #define DEFAULT_CMAP_HIST_FLAG  FALSE
  176. #define DEFAULT_CMAP_DITHER_TYPE CMAP_DITHER_NONE
  177.  
  178. /*
  179.  * Options for Median Cut stuff.
  180.  */
  181. #define CMAP_MEDIAN_SUM    0
  182. #define CMAP_MEDIAN_CENTER 1
  183. #define DEFAULT_CMAP_MEDIAN_TYPE 0
  184.  
  185. /* These are for TrueColor animatons such and HAM,HAM8 or 24 bit RLE files.
  186.  * true_to_332 means images are truncated to 3 bits red, 3 bits green and
  187.  *     2 bits blue in order to fit in a 256 entry cmap. If your X11 display
  188.  *     supports less than 256 cmap entries, these numbers will be less.
  189.  *
  190.  * true_to_gray means TrueColor anims are converted to 8bits of gray.
  191.  * true_to_1st means TrueColor anims have a cmap created by running
  192.  *     a median cut algorithm on their 1st image and then using that
  193.  *    for the remainder of the images. Anim must be buffered.
  194.  * true_to_all means TrueColor anims have a cmap created by running a
  195.  *    median cut algorithm on each image to create a cmap for each
  196.  *    image. Adds substantially to start up time. Anim must be buffered.
  197.  * true_to_map: This is automatically set when true_to_1st and true_to_all
  198.  *    are turned on. It can be optionally used with true_to_332 and
  199.  *    true_to_gray to used more bits(than332) when dithering TrueColor
  200.  *    anims down to the Displays cmap. Really doesn't make any sense
  201.  *    to set this with true_to_gray unless your display has less than
  202.  *    8 bits of grayscale.
  203.  */
  204. #define DEFAULT_TRUE_TO_332     TRUE
  205. #define DEFAULT_TRUE_TO_GRAY    FALSE
  206. #define DEFAULT_TRUE_TO_1ST     FALSE
  207. #define DEFAULT_TRUE_TO_ALL     FALSE
  208. #define DEFAULT_TRUE_MAP_FLAG    FALSE
  209.  
  210. /* 6 is 256K, 7 is 2M and 8 is 16M */
  211. #define CMAP_CACHE_MAX_BITS 6
  212. #define DEFAULT_CMAP_MEDIAN_CACHE FALSE
  213.  
  214. /*
  215.  * Title Options
  216.  *
  217.  * NONE        Title is just "XAnim"
  218.  * FILE        Title is just anim name while running. When stopped the
  219.  *        frame number is included.
  220.  * FRAME    Title is anim anim and frame number while running.
  221.  */
  222.  
  223. #define XA_TITLE_NONE   0
  224. #define XA_TITLE_FILE   1
  225. #define XA_TITLE_FRAME  2
  226.  
  227. #define DEFAULT_XA_TITLE_FLAG  1
  228.  
  229. /*
  230.  * GAMMA Options.
  231.  *
  232.  * DISP_GAMMA:    Is the default gamma of your display. This is to be
  233.  *        used to universally darken or lighten animations. Also
  234.  *        may be used to help gamma correct your display. :^)
  235.  *
  236.  * ANIM_GAMMA:    This is used to specify that all anims(unless specified
  237.  *        on the command line) are treated as if they were color
  238.  *        compensated to this gamma value. Unfortunately, for
  239.  *        the majority of the cases, you have no clue what gamma
  240.  *        value the animation was compensated to.
  241.  */
  242. #define DEFAULT_DISP_GAMMA 1.0
  243. #define DEFAULT_ANIM_GAMMA 1.0
  244.  
  245. /* 
  246.  * At the end of displaying the command line, xanim will either loop
  247.  * through again(FALSE), exit(TRUE), or pause and wait user input(PAUSE).
  248.  */
  249. #define DEFAULT_XA_EXIT_FLAG  FALSE
  250.